<h2>Manage articles</h2>

<table>
	<tr>
		<th>Title</th>
		<th>Key</th>
		<th>Author</th>
		<th>Creation Date</th>
		<th>Actions</th>
	</tr>
<?php foreach ($this -> arrArticles as $objArticle) { ?>
	<tr>
		<td><?php echo htmlspecialchars($objArticle -> title); ?></td>
		<td><?php echo htmlspecialchars($objArticle -> key); ?></td>
		<td><?php echo htmlspecialchars($objArticle -> author); ?></td>
		<td><?php echo date('F j, Y', $objArticle -> creationDate); ?></td>
		<td>
			<a href="<?php echo $basePath; ?>/article/<?php echo $objArticle -> key; ?>.html">View</a>
			|
			<a href="<?php echo $basePath; ?>/admin/article/edit/<?php echo $objArticle -> id; ?>">Edit</a>
			|
			<a href="<?php echo $basePath; ?>/admin/article/delete/<?php echo $objArticle -> id; ?>">Delete</a>
		</td>
	</tr>
<?php } ?>
</table>

<?php if ($this -> arrArticles == array()) {?>
<p>
	No articles available.
</p>
<?php } ?>
